﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using mesoBoard.Data.Repositories;

namespace mesoBoard.Data
{
    public partial class Thread
    {
        public string Title
        {
            get
            {
                return this.FirstPost.Title;
            }
        }

        public Post FirstPost
        {
            get
            {
                return this.Posts.FirstOrDefault(x => x.PostID == this.FirstPostID);
            }
        }

        public Post LastPost
        {
            get
            {
                return this.Posts.FirstOrDefault(x => x.PostID == this.LastPostID);

            }
        }
    }
}
